package iotest.stream01;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "坤坤";
        int age= 25;
        char gender= '男';
        String skill = "鸡你太美";
        Student kk = new Student(name,age,gender,skill);
        FileOutputStream fos = new FileOutputStream("jntm.txt");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(kk);
        System.out.println("写完了");
        oos.close();

    }
}
